home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / rain_for.swf / scripts / __Packages / BG.as < prev    next >
Encoding:
Text File  |  2010-04-12  |  650 b   |  31 lines

  1. class BG extends smashing.Renderable
  2. {
  3.    var halfWidth;
  4.    var x;
  5.    var z;
  6.    var y;
  7.    var ack = "ack";
  8.    function BG()
  9.    {
  10.       super();
  11.       this.halfWidth = this._width / 2;
  12.       this.x = 0;
  13.       this.z = 0;
  14.       this.y = this._y;
  15.    }
  16.    function render()
  17.    {
  18.       var _loc2_ = smashing.Viewport.getPos(this);
  19.       if(_loc2_.y <= smashing.Viewport.centerY)
  20.       {
  21.          this._visible = true;
  22.          this._x = _loc2_.x * _loc2_.scale % this.halfWidth;
  23.          this._y = _loc2_.y * _loc2_.scale + smashing.Viewport.centerY;
  24.       }
  25.       else
  26.       {
  27.          this._visible = false;
  28.       }
  29.    }
  30. }
  31.